////////////////////////////////////////////////
// -- DepthHUD Lite                           //
// by Hurricaaane (Ha3)                       //
//                                            //
// http://www.youtube.com/user/Hurricaaane    //
//--------------------------------------------//
// Base panel                                 //
////////////////////////////////////////////////

local PANEL = {}

function PANEL:Init()
	self:SetContentAlignment( 6 )
	self:SetFont( "DHLITE_Text" )
	self:SetColor( color_white )
	
end
/*
function PANEL:Think()
	if LocalPlayer and ValidEntity( LocalPlayer() ) then
		self:SetRate( LocalPlayer():Health() / 100 )
		self:SetText( LocalPlayer():Health() )
	end
	
end
*/

function PANEL:Think()
	if LocalPlayer and ValidEntity( LocalPlayer() ) then
		local speed = LocalPlayer():GetVelocity():Length()
		self:SetRate( speed / 500 )
		self:SetText( math.floor( speed ) )
	end
	
end

derma.DefineControl( "DHUI_Health", "", PANEL, "HIndicatorLabel" )